
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Database Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<script type="text/javascript">
<!--
function doSQL()
{
    var sqlstr = document.getElementById("txtSQL").value;

    var xmlhttp;
    if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
        xmlhttp=new XMLHttpRequest();
    }
    else {// code for IE6, IE5
        xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    }

    xmlhttp.onreadystatechange=function() {
        if (xmlhttp.readyState==4 && xmlhttp.status==200) {
            document.getElementById("divRes").innerHTML = xmlhttp.responseText;
        }
    }

    xmlhttp.open("POST", "dbtest.php", true);
    xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
    xmlhttp.send("txtSQL=" + sqlstr);

    document.getElementById("divRes").innerHTML = xmlhttp.responseText;
}
-->
</script>
</head>
<body>

<textarea id="txtSQL" cols="80" rows="3"></textarea>
<button type="button" onclick="doSQL()">Execute</button>
<hr />
<div id="divRes" align="center"></div>

</body>
</html>

